package cn.juque.jdfsystem.vo.blacklist;

import cn.juque.jdfsystem.vo.BaseVO;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author JUQUE
 * @version 1.0.0
 * <ul>
 *  <li>simple-generator</li>
 *  <li>黑名单信息</li>
 * </ul>
 * @date 2023-01-13 15:18:08
 **/
@Data
public class BlacklistInfoAddVO extends BaseVO {

    /**
     * IP名称
     */
    @NotEmpty(message = "IP不能为空")
    @Size(message = "IP不能超过{max}个字符", max = 16)
    private String ip;

    /**
     * 有效标识
     */
    @NotNull(message = "有效状态。1-有效；0-无效不能为空")
    @Range(min = 0, max = 9, message = "有效状态必须在{min}-{max}之间")
    private Integer validFlag;

    /**
     * 备注
     */
    @Size(message = "备注不能超过{max}个字符", max = 200)
    private String remark;
}
